package com.ydgk.service.impl;

import com.ydgk.bean.Detail;
import com.ydgk.dao.DetailMapper;
import com.ydgk.service.DetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DetailServiceImpl implements DetailService{

    @Autowired
    private DetailMapper detailMapper;

    public int insert(Detail detail) {
        return detailMapper.insert(detail);
    }

    public List<Detail> findByFid(int fid) {
        return detailMapper.findByFid(fid);
    }

    public int deleteByIdAndFid(int did, int fid) {
        return detailMapper.deleteByIdAndFid(did,fid);
    }

    public Detail findById(int did) {
        return detailMapper.findById(did);
    }
}
